<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Encrypting the Plaintext Private Key File">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000002199970501">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Encrypting the Plaintext Private Key File</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000002199970501"></a><a name="EN-US_TOPIC_0000002199970501"></a>

<h1 class="topictitle1">Encrypting the Plaintext Private Key File</h1>
<div><p>When updating the client certificate, server certificate, or internal communication certificate, ensure that the imported private key file is encrypted. This section describes how to use the OpenSSL tool to encrypt the plaintext private key file.</p>
<div class="section"><h4 class="sectiontitle">Prerequisites</h4><p>The OpenSSL tool has been installed on the local maintenance terminal.</p>
</div>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>In the directory where the plaintext private key is stored, run the following command to encrypt the plaintext private key:</span><p><pre class="screen">openssl rsa -aes256 -in<em> arg1</em> -out <em>arg2</em></pre>
<p><em>arg1</em> indicates the name of the original private key file, and <em>arg2</em> indicates the name of the encrypted private key file.</p>
</p></li><li><span>Enter the encryption password twice as prompted.</span></li></ol>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>